package work.xiaohong.saolei.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import static io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY;

@Schema(name = "User")
@Data
public class User implements Serializable{

    @TableId(value = "id",type = IdType.ASSIGN_ID)
    @Schema(description = "主键id",accessMode = READ_ONLY,required = true)
	private Long id;//主键id

    @Schema(description = "开放id",required = true)
    @TableField("openId")
	private String openId;//开放id

    @Schema(description = "玩家昵称",required = true)
    @TableField("nickName")
	private String nickName;//玩家昵称

    @Schema(description = "头像地址",required = true)
    @TableField("headPic")
	private String headPic;//头像地址

    @Schema(description = "用户性别",required = true)
    @TableField("gender")
	private String gender;//用户性别

    @Schema(description = "登录类型",required = true)
    @TableField("type")
	private String type;//登录类型

	@Schema(description = "积分",required = true)
	@TableField("count")
	private Integer count;//积分

    @Schema(description = "被点赞次数",required = true)
    @TableField("dianzanTotal")
	private Integer dianzanTotal;//被点赞次数

    @Schema(description = "总场次",required = true)
    @TableField("gameTotal")
	private Integer gameTotal;//总场次

	@Schema(description = "Pk胜利场次",required = true)
	@TableField("pkTotal")
	private Integer pkTotal;//Pk胜利场次

    @Schema(description = "最好成绩（Json字符串格式）")
    @TableField("bestGrade")
	private String bestGrade;//最好成绩（Json字符串格式）

	@Schema(description = "pk状态(true,false)")
	@TableField("pkStatus")
	private String pkStatus;//pk状态(true,false)

    @Schema(description = "创建时间",accessMode = READ_ONLY)
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)
	private LocalDateTime gmtCreate;//创建时间

    @Schema(description = "更改时间",accessMode = READ_ONLY)
    @TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)
	private LocalDateTime gmtModified;//更改时间

    @Schema(description = "乐观锁",accessMode = READ_ONLY)
    @Version
	private Integer version;//乐观锁

    @Schema(description = "逻辑删除标志",accessMode = READ_ONLY)
    @TableLogic
	private Integer deleted;//逻辑删除标志

	@Schema(description = "查询最好成绩返回数据",accessMode = READ_ONLY)
	@TableField(exist = false)
	private Float requeryGrade; // 查询最好成绩返回数据

	@Schema(description = "用户状态",accessMode = READ_ONLY)
	@TableField(exist = false)
	private String  status; // 用户状态


	@Schema(description = "是否已点赞",accessMode = READ_ONLY)
	@TableField(exist = false)
	private Boolean zan; // 是否已点赞


}
